package test.covert;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import test.dto.UserDTO;
import test.vo.UserVO;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : example
 * @ Author: XuLeHuang
 * @ Date: 2023/1/7 23:02
 * @ Description:
 */
@Service
public class UserDTOCovert implements VoToDTOCovert {

    @Override
    public Object doCovert(Object vo) {
        UserVO userVO = (UserVO) vo;
        String name = userVO.getName();
        UserDTO userDTO = new UserDTO();
        userDTO.setName(name);
        return userDTO;
    }
}
